import { ToRefs } from "vue";
export interface IFunction<T = any> {
    (x?: any): T;
}

export interface IObject<T = any> {
    [key: string]: T;
}

export interface IHttpResponse {
    code: number;
    msg: string;
    data: any;
}
export interface IServerMenus{
    id: string,
    pid: string,
    children: IServerMenus[],
    name: string,
    path: string,
    routeName: string,
    url: string,
    type: number,
    openStyle: number,
    icon: string,
    permissions: string,
    sort: number,
    createDate: string,
    parentName: string
}

export interface ICacheOptions {
    /**
     * 是否取值后立即删除缓存
     */
    isDelete?: boolean;
    /**
     * 是否采用JSON格式化缓存值
     */
    isParse?: boolean;
    /**
     * 是否采用会话缓存介质
     */
    isSessionStorage?: boolean;
}
export interface window{
    axios: object
}
export interface IViewHooks{
    //检查权限
    hasPermission: (key: string) => boolean;
}